package com.tangtang.security.model;

import com.tangtang.core.validator.*;

import java.util.Date;

public class SysResource {
    private Integer resourceId;

    @MustGreatThan(value = 0)
    private Integer resourceParentId;
    @MustNotBlank
    @MustLengthGreatThan(value = 1)
    private String resourceName;

    private String resourceMenuName;
    @MustNotBlank
    @MustMatch(pattern = MatchPattern.URL)
    private String resourceUrl;

    private String resourceRequestMethod;
    @MustGreatThan(value = 1)
    private Integer priority;

    private String resourceIcon;

    private Date opTime;

    private Integer status;

    public Integer getResourceId() {
        return resourceId;
    }

    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    public Integer getResourceParentId() {
        return resourceParentId;
    }

    public void setResourceParentId(Integer resourceParentId) {
        this.resourceParentId = resourceParentId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName == null ? null : resourceName.trim();
    }

    public String getResourceMenuName() {
        return resourceMenuName;
    }

    public void setResourceMenuName(String resourceMenuName) {
        this.resourceMenuName = resourceMenuName == null ? null : resourceMenuName.trim();
    }

    public String getResourceUrl() {
        return resourceUrl;
    }

    public void setResourceUrl(String resourceUrl) {
        this.resourceUrl = resourceUrl == null ? null : resourceUrl.trim();
    }

    public String getResourceRequestMethod() {
        return resourceRequestMethod;
    }

    public void setResourceRequestMethod(String resourceRequestMethod) {
        this.resourceRequestMethod = resourceRequestMethod == null ? null : resourceRequestMethod.trim();
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public String getResourceIcon() {
        return resourceIcon;
    }

    public void setResourceIcon(String resourceIcon) {
        this.resourceIcon = resourceIcon == null ? null : resourceIcon.trim();
    }

    public Date getOpTime() {
        return opTime;
    }

    public void setOpTime(Date opTime) {
        this.opTime = opTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}